unit fuQExport4About;

{$I QExport4VerCtrl.inc}

interface

uses Classes, Controls, Forms, StdCtrls, Buttons,
  ExtCtrls, Graphics;

type
  TfmQExport4About = class(TForm)
    lbVerInfo: TLabel;
    BitBtn1: TBitBtn;
    lbCopyRight: TLabel;
    Image1: TImage;
    laDevelopers: TLabel;
    lbCompanyHomePageTag: TLabel;
    lbProductHomePageTag: TLabel;
    lbCompanyHomePage: TLabel;
    lbProductHomePage: TLabel;
    GroupBox1: TGroupBox;
    lbVersion: TLabel;
    lbRegisterNow: TLabel;
    lbLicense: TLabel;
    Panel1: TPanel;
    laWarn: TLabel;
    procedure FormCreate(Sender: TObject);
    procedure lbCompanyHomePageClick(Sender: TObject);
    procedure lbRegisterNowClick(Sender: TObject);
    procedure lbLicenseClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

procedure ShowAboutForm;

implementation

uses Windows, ShellAPI, SysUtils, QExport4Common, fuQExport4License;

{$R *.DFM}

procedure ShowAboutForm;
begin
  with TfmQExport4About.Create(nil) do
  try
    lbVerInfo.Caption := Format(S_FULL_PRODUCT_NAME, [S_VERSION]);
    lbCopyRight.Caption := S_COPYRIGHT;
    ShowModal;
  finally
    Free;
  end;
end;

procedure TfmQExport4About.FormCreate(Sender: TObject);
begin
{$IFDEF ADVANCED_DATA_EXPORT_TRIAL_VERSION}
  lbVersion.Caption := 'Evalution version';
{$ELSE}
  lbVersion.Caption := 'Registered version';
  lbVersion.Font.Color := clBlack;
  lbRegisterNow.Visible := False;
{$ENDIF}
end;

procedure TfmQExport4About.lbCompanyHomePageClick(Sender: TObject);
begin
  ShellExecute(Handle, 'open',
               PChar((Sender as TLabel).Caption),
               nil, nil, SW_SHOW);
end;

procedure TfmQExport4About.lbRegisterNowClick(Sender: TObject);
begin
  ShellExecute(Handle, 'open',
               PChar(S_REG_URL),
               nil, nil, SW_SHOW);
end;

procedure TfmQExport4About.lbLicenseClick(Sender: TObject);
begin
  with TfmQExport4License.Create(nil) do
  try
    ShowModal;
  finally
    Free;
  end;
end;

end.
